const path = require('path');

module.exports = {
    devServer: {
        host: 'localhost',
        port: 8080,
        proxy: {
            '/api': {
                target: 'http://127.0.0.1:3000'
            }
        }
    },
    pluginOptions: {
        'style-resources-loader': {
            'preProcessor': 'stylus',
            'patterns': [
                path.resolve(__dirname, './src/styles/abstracts/*.styl'),
            ]
        }
    },
    configureWebpack: {
        externals: {
            'vue': 'Vue',
            'vue-router': 'VueRouter',
            'vuex': 'Vuex',
            'element-ui': 'ElementUI'
        },
        resolve: {
            alias: {
                'services': '@/services',
                'store': '@/store',
                'layout': '@/layout',
                'pages': '@/pages',
                'components': '@/components',
                'assets': '@/assets',
                'router': '@/router',
                'util': '@/util'
            }
        }
    },

}